@extends('pc.v3.layouts.newapp')
@push('styles')
  <link rel="stylesheet" href="{{web_static('pc/v3/css/blog.min.css',true)}}"/>
@endpush
@section('content')
  <div class="blog-content">
    <div class="blog-content-center">
      <div class="blog-content-nav">
        @foreach (\Common\Define\View\WebBlogChannel::items() as $item)<a href="{{seo_url($item['url'])}}" class="@if($list_url->getChannel() == $item['url']) content-nav-color @endif">{{$item['name']}}</a>
        @endforeach
      </div>
      <div class="com-Img"><img src="{{$list_url->getCurrentChannel('image')}}@1180w_340h.jpg"/></div>
      <div class="comm-content">
        <div class="comm-content-left">
          @if(!$items->isEmpty())
          @foreach ($items as $item)
          <div class="com-conleft-list">
            <h3>
              @php $blog_url = sprintf('/%s/%s.html',\Common\Define\Route\WebRoute::BLOG,$item->id); @endphp<a href="{{url($blog_url)}}" target="_blank" title="{{$item->title}}">{{str_limit($item->title,60)}}</a>
            </h3>
            <p class="con-conleft-p">分类：<span class="con-conleft-span">{{$item->classifyName}}</span><span>{{date('Y-m-d',($item->createdAt/1000))}}</span></p>
            <div class="content-left-img"><a href="{{url($blog_url)}}" target="_blank"><img src="{{$item->topImg}}@810w_360h_1c_1e" alt="{{$item->title}}"/></a></div>
            <p>{{str_limit($item->viceTitle,130)}}</p>
          </div>
          @endforeach
          @endif
          <div class="comm-content-pagination">
            @if(!$items->isEmpty())
              {{$items->render('pc.v3.pagination.blog',compact('list_url'))}}
            @endif
          </div>
        </div>
        <div class="comm-content-right">
          @php
            $req = new Common\Java\Cms\ResourceList();
            $blogResourceSidebar = $req->pc_blog_sidebar($city->area_code);
          @endphp
          <ul class="comm-content-rightUl">
            <li class="comm-content-rightImg"><img src="{{web_static('pc/v3/assets/blog/youner.png')}}"/></li>
            @if(is_array($blogResourceSidebar))
              @foreach($blogResourceSidebar as $sidebar)
                @php $resource = Common\Standard\Object\stdResource::instance($sidebar); @endphp
                <li><a href="{{$resource->pc_city_url_convert($city, $resource->getLinkUrl())}}" title="{{$resource->getTitle()}}"><img src="{{$resource->getImageUrl()}}@308w_230h.jpg" alt="{{$resource->getTitle()}}"/></a></li>
              @endforeach
            @endif
          </ul>
          @php
            $req = new Common\Java\Cms\ResourceList();
            $blogResourceArticle = $req->pc_blog_recommend_article($city->area_code);
          @endphp
          @if(is_array($blogResourceArticle))
            <ul class="comm-content-right-last">
              <li>
                <h3>精彩推荐</h3>
              </li>
              @foreach($blogResourceArticle as $resourceArticle)
                @php $resource = Common\Standard\Object\stdResource::instance($resourceArticle); @endphp
                <li><i>{{$loop->iteration}}</i><span><a href="{{$resource->pc_city_url_convert($city, $resource->getLinkUrl())}}" target="_blank" title="{{$resource->getTitle()}}">{{$resource->getTitle()}}</a></span></li>
              @if($loop->iteration > 10) @break @endif
              @endforeach
            </ul>
          @endif
          <div class="blog-right-last"><a href="{{seo_url(\Common\Define\Route\WebRoute::DOWNLOAD)}}" target="_blank"><img src="http://img.ishangzu.com/ishangzu/2017/06/16/17/c3ed5e7d-a549-6d5a-5652-e2bfd3d99444.jpg"/></a></div>
        </div>
      </div>
    </div>
  </div>
@endsection
@push('scripts')
  <script src="{{web_static('pc/v3/js/blog.min.js',true)}}"></script>
@endpush